from flask_restful.reqparse import Argument
from enum import Enum


class FArgument(Argument):
    """
    参数规格的参数
    """

    def __init__(self, name, default=None, dest=None, required=True,
                 ignore=False, type=None, location=('json', 'values',),
                 choices=(), action='store', help=None, operators=('=',),
                 case_sensitive=True, store_missing=True, trim=False,
                 nullable=True):
        _help: str = help
        if _help is None:
            _help: str = f"参数<{name}:{type}>错误，请排查并修改".replace("<class \'", "").replace("\'>", "")
        super().__init__(name, default=default, dest=dest, required=required,
                         ignore=ignore, type=type, location=location,
                         choices=choices, action=action, help=_help, operators=operators,
                         case_sensitive=case_sensitive, store_missing=store_missing, trim=trim,
                         nullable=nullable)


class PlatformType(Enum):
    """
    平台类型
    """
    自己合成 = 0
    抖音 = 1
